# 24.py
# 描述器2

class Person():
  def __init__(self):
    self.__age = 10

  @property
  def age(self):
    return self.__age

  @age.setter
  def age(self, value):
    if value <0:
      value = 0
    self.__age = value

  @age.deleter
  def age(self):
    del self.__age

p = Person()
print(p.age)
p.age = -1
print(p.age)
del p.age
# print(p.age)



